home *** CD-ROM | disk | FTP | other *** search
- Path: hamlet.uncg.edu!q_zhong
- From: "QIAN . ZHONG" <q_zhong@hamlet.uncg.edu>
- Newsgroups: comp.lang.c++
- Subject: pInt = new int [987654321L], what will happen ?
- Date: Sat, 3 Feb 1996 22:06:07 -0500
- Organization: The University of North Carolina at Greensboro
- Message-ID: <Pine.SOL.3.91.960203215559.25805E-100000@hamlet.uncg.edu>
- NNTP-Posting-Host: hamlet.uncg.edu
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
-
-
- Hi, folks:
-
- Here is a question about new, the following is my code:
-
- int main(void)
- {
- int *pInt;
- long Block = 987654321L;
-
- pInt = new int[Block];
- if(pInt == NULL) dosomething();
- }
-
- My problem is when I compile the program for DOS under large memory
- model, above new nerve return NULL, I guess compiler convert
-
- new int[987654321L] --- convert --> new int[ ACONST]
- where ACONST = 0xffff , or ACONST = 0x7fff, am I right ?
- Is this a DOS thing ? or a C++ thing ? Is this portable ?
-
-
- Qian Zhong
- Department of Chemistry.
- UNC, Greensboro
- Email: q_zhong@hamlet.uncg.edu
-
-
-